Why is the second 'for' loop in matrix multiplication using range(len(B[0]))